import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import fire from '@dfeidao/atom-web/msg/fire';
import nodejs from '@dfeidao/atom-web/msg/nodejs';

// import whoami from '@dfeidao/atom-web/msg/whoami';
export default async function a005(fd: IFeidaoAiBrowserComponent, args: { target: HTMLElement }) {
	// 删除
	event.stopPropagation();
	const productid = get(fd, 'productid');
	const clicknode = args.target;
	const level_no = clicknode.getAttribute('level_no');
	const res = await nodejs('level-inf/zj-000001/s009', { productid, level_no });
	// debugger;

	if (res === 'success') {
		fire('zj-000002', 'ec-001', { level_no, productid });

	} else {
		fire('zj-000003', 'ec-001');

	}
}
